package com.obtk.shilipai.service;

import com.obtk.shilipai.dao.ShopMapper;
import com.obtk.shilipai.entity.Shop;
import com.obtk.shilipai.entity.ShopType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ShopService {
    @Autowired
    private ShopMapper shopMapper;

    public Shop login(Shop loginShop) {
        return shopMapper.login(loginShop);
    }

    public Shop getShopByAll(Integer shopId) {
        return shopMapper.getShopByAll(shopId);
    }

    public List<ShopType> getShopType(Integer tpyeId) {
        return shopMapper.getShopType(tpyeId);
    }

    public Integer updateShop(Shop shop) {
        return shopMapper.updateShop(shop);
    }

    public Integer selectUser(String shopUser) {
        return shopMapper.selectUser(shopUser);
    }

    public Integer addShop(Shop shop) {
        return shopMapper.addShop(shop);
    }

    public Integer updateShopImage(Shop shop) {
        return shopMapper.updateShopImage(shop);
    }

    public List<Shop> selectShopByAll(String shopName) {
        return shopMapper.selectShopByAll(shopName);
    }

    public Integer selectShopName(String shopName) {
        return shopMapper.selectShopName(shopName);
    }
}
